﻿//-----------------------------------------------------------------
// 创建时间:  2008年11月8日
// 创建者  : WuGui.Yang
//-----------------------------------------------------------------
using System; 
using System.Data;
using System.Data.SqlClient;
using System.Runtime.Serialization;
using System.Collections.Generic;

using Ruandao.MiniDac;

namespace Ruandao.Foundation.DataAccess
{
	/// <summary>
	/// Table [TagContentIndex] MiniDac Entity Class 
	/// </summary>
	public partial class TagContentIndexEntity : EntityBase< TagContentIndexEntity >
	{
        static public int[] SearchByTagIndex(int tagIndexId)
        {
            string sql = "SELECT ContentId FROM TagContentIndex WHERE TagIndexId=" + tagIndexId.ToString() + " ORDER BY Rank DESC";

            List<int> ids = new List<int>();
            IDataReader reader = ExecuteReader(sql);
            while (reader.Read())
            {
                ids.Add(reader.GetInt32(0));
            }
            return ids.ToArray();
        }

        static public int[] SearchTagIndex(int tagGroupId, int contentId)
        {
            throw new NotImplementedException();
        }

    }

}
